//1. 方式一
async function fn() {}
fn();

//2. 方拾二
(async function () {})();

//导入 fs 模块
const fs = require("fs/promises"); //这里结尾处一定要加『;』
//3. 方式三
(async () => {
  try {
    //获取第一个文件中的内容
    let data1 = await fs.readFile("./resource/1.html");
    let data2 = await fs.readFile("./resource/2.html");
    let data3 = await fs.readFile("./resource/3.html");

    //拼接合并
    console.log(data1.toString() + data2.toString() + data3.toString());
  } catch (e) {
    //处理失败的结果值
    console.log(e.errno);
  }
})();
